<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo e(\Cache::get('blog_config')['name']); ?><?php echo e(isset($article_info['title'])?'--' . $article_info['title']:''); ?></title>
<meta name="keywords" content="<?php echo e(isset($article_info['keywords'])?$article_info['keywords']:\Cache::get('blog_config')['keywords']); ?>" />
<meta name="description" content="<?php echo e(isset($article_info['description'])?$article_info['description']:\Cache::get('blog_config')['description']); ?>" />
<meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<?php echo config('blog.admin_url'); ?>/css/base.css" rel="stylesheet">
<link href="<?php echo config('blog.admin_url'); ?>/css/m.css" rel="stylesheet">
<script src="<?php echo config('blog.admin_url'); ?>/js/jquery-1.8.3.min.js" ></script>
<script src="<?php echo config('blog.admin_url'); ?>/js/comm.js"></script>
<link rel="stylesheet" href="<?php echo config('admin.admin_url'); ?>/plugins/layui/css/layui.css" media="all" />
<script type="text/javascript" src="<?php echo config('admin.admin_url'); ?>/plugins/layui/layui.js"></script>
<!--[if lt IE 9]>
<script src="<?php echo config('blog.admin_url'); ?>/js/modernizr.js"></script>
<![endif]-->
</head>
<body>
<header id="header">
  <div class="navbox">
    <h2 id="mnavh"><span class="navicon"></span></h2>
    <div class="logo"><a><?php echo e(\Cache::get('blog_config')['name']); ?></a></div>
    <nav>
      <ul id="starlist">
        <?php $__currentLoopData = \Cache::get('blog_menus'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k=>$v): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
			<?php if(isset($v['children']) && count($v['children']) > 0): ?>
				<li class="menu"><a id="<?php echo e(isset($id) && $v['id'] == $id?'selected':''); ?>"><?php echo e($v['title']); ?></a>
				<ul class="sub">
					<?php $__currentLoopData = $v['children']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k1=>$v1): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
						<li><a href="<?php echo e(route('blog.index.index',['id'=>$v1['id']])); ?>"><?php echo e($v1['title']); ?></a></li>
					<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
				</ul> 
				<span></span>
				</li>
				<?php else: ?>
				<li><a href="<?php echo e(route('blog.index.index',['id'=>$v['id']])); ?>" id="<?php echo e(isset($id) && $v['id'] == $id?'selected':''); ?>"><?php echo e($v['title']); ?></a></li>	
			<?php endif; ?>
		<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <li><a id="<?php echo e(isset($id) && $id == -1?'selected':''); ?>" href="<?php echo e(route('blog.index.my')); ?>">关于我们</a></li>
      </ul>
    </nav>
    <div class="searchico"></div>
  </div>
</header>
<div class="searchbox">
  <div class="search">
    <form action="" method="get">
      <input id="title" class="input_text" type="text"/>
      <div class="input_submit" onclick="search()">搜索</div>
    </form>
  </div>
  <div class="searchclose"></div>
</div>
<script>	
layui.use(['layer'], function () { 		
	var $= layui.jquery,layer = layui.layer;	
	$.ajaxSetup({			
		headers: {				
			'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')			
		}		
	});
	search = function(){
		var title = $('#title').val();
		if ($.trim(title) === ''){
			layer.msg('请输入搜索条件！', {icon: 0});
			return;
        }
		location.href = "<?php echo e(route('blog.index.search')); ?>"+'?title='+title;
	}
});
</script>